CommandDelete Class Reference

#include <CommandDelete.h>

Inheritance diagram for CommandDelete:

Command List of all members.

Public Member Functions

 CommandDelete (OSGWindows *osgwind)
 CommandDelete (OSGWindows *osgwind, TraffEduObject *obj)
bool execute ()
bool unexecute ()

Private Attributes

OSGWindows * osgwind_
vector< TraffEduObject * > deletedObjs_
int rightCLK
TraffEduObject * obj_

Detailed Description

Definition at line 8 of file CommandDelete.h.


Constructor & Destructor Documentation

CommandDelete::CommandDelete (  OSGWindows *  osgwind  ) 
 

A constructor. Initializes osgwind_ and rightCLK variables. It is called if the delete operation is done from the menubar.

Parameters:
osgwind an OSGWindows pointer.

Definition at line 2 of file CommandDelete.cpp.

References deletedObjs_, OSGWindows::getSelectedObjects(), osgwind, osgwind_, and rightCLK.

CommandDelete::CommandDelete (  OSGWindows *  osgwind,
TraffEduObject *  obj
) 
 

A constructor. Initializes osgwind_, obj_, and rightCLK variables. It is called if the delete operation is done from the menubar.

Parameters:
osgwind an OSGWindows pointer.
obj a TraffEduObject pointer.

Definition at line 10 of file CommandDelete.cpp.

References deletedObjs_, obj_, osgwind, osgwind_, and rightCLK.


Member Function Documentation

bool CommandDelete::execute (   )  [virtual]
 

do the delete operation.

Returns:
Operation success

Implements Command.

Definition at line 20 of file CommandDelete.cpp.

References OSGWindows::clearSelectedObjects(), deletedObjs_, OSGWindows::doDeleteGeode(), osgwind_, and rightCLK.

bool CommandDelete::unexecute (   )  [virtual]
 

undo the delete operation.

Returns:
Operation success

Implements Command.

Definition at line 33 of file CommandDelete.cpp.

References deletedObjs_, OSGWindows::doAddGeode(), osgwind_, rightCLK, and OSGWindows::setSelectedObjects().


Member Data Documentation

vector<TraffEduObject*> CommandDelete::deletedObjs_ [private]
 

a private vector of TraffEduObjects. It holds the deleted objects.

Definition at line 22 of file CommandDelete.h.

Referenced by CommandDelete(), execute(), and unexecute().

TraffEduObject* CommandDelete::obj_ [private]
 

a private variable. It is used to hold the deleted object.

Definition at line 34 of file CommandDelete.h.

Referenced by CommandDelete().

OSGWindows* CommandDelete::osgwind_ [private]
 

a private variable. It is initialized with the unique OSGWindows instance.

Definition at line 16 of file CommandDelete.h.

Referenced by CommandDelete(), execute(), and unexecute().

int CommandDelete::rightCLK [private]
 

a private variable. It shows if the CommandDelete is called from the RightClickMenu or not.

Definition at line 28 of file CommandDelete.h.

Referenced by CommandDelete(), execute(), and unexecute().


The documentation for this class was generated from the following files:
Generated on Sun May 28 18:54:12 2006 for TraffEdu by  doxygen 1.4.6-NO